@extends('front.common.header')

@section('title','举报 - 就业指南')

@section('head')
@parent
@stop
@include('UEditor::head')
@section('content')
<link href="{{ asset('/css/company/jobs.css') }}" rel="stylesheet" type="text/css">
<link href="{{ asset('/css/employ/list.css') }}" rel="stylesheet" type="text/css">

<div class="contribute-content">
  <div class="contribute-wrap">
     <div class="contribute-wrap-l float-l " >
        <form id="tougaoForm" method="post" action="">
        <div class="panel panel-default description2">
            <div class="form-group mt-20">
                <label class="col-xs-12 col-sm-3 col-md-2 control-label">文章标题:<span class="cred">*</span></label>
                <div class="col-sm-9 col-xs-12">
                    <input type="text" class="form-control" name="title" id="title" placeholder="标题" value="">
                </div>
                <div class="clearfix"></div>
            </div>
            <div class="form-group">
                <label class="col-xs-12 col-sm-3 col-md-2 control-label">文章分类:<span class="cred">*</span></label>
                <div class="col-sm-3 col-xs-12" id="parent">
                    <select name="type" class="form-control" id="type" onchange="getChilds('category',this.value,'parent')">
                        <option value="0">请选择分类</option>
                        @foreach($type as $tp)
                        <option value="{{ $tp->cat_id }}">{{ $tp->cat_name }}</option>
                        @endforeach
                    </select>
                </div>
                <div class="col-sm-3 col-xs-12" id="child_1"></div>
                <div class="col-sm-3 col-xs-12" id="child_2"></div>
                <div class="col-sm-3 col-xs-12" id="child_3"></div>
                <div class="clearfix"></div>
            </div>
            <div class="form-group">
                <label class="col-xs-12 col-sm-3 col-md-2 control-label">文章封面:<span class="cred">*</span></label>
                <div class="col-sm-9 col-xs-12">
                    <input id="uploadimg" name="uploadimg" type="file" multiple="true">
                    <div id="imgbox" class="dustbin">
                        <div style='width:90px; height:60px;float:left;'>
                            <img src=''/>
                            <input type='hidden' name='thumb' value='' />
                        </div>
                    </div>
                </div>
                <div class="clearfix"></div>
            </div>
            <div class="form-group">
                <label class="col-xs-12 col-sm-3 col-md-2 control-label">文章简介:<span class="cred">*</span></label>
                <div class="col-sm-9 col-xs-12">
                    <script id="description" name="description"  style="width:100%;margin:0 auto;height:100px;" type="text/plain"></script>
                </div>
                <div class="clearfix"></div>
            </div>
            <div class="form-group">
                <label class="col-xs-12 col-sm-3 col-md-2 control-label">文章内容:<span class="cred">*</span></label>
                <div class="col-sm-9 col-xs-12">
                    <script id="container" name="content"  style="width:100%;margin:0 auto;height:300px;" type="text/plain"></script>
                </div>
                <div class="clearfix"></div>
            </div>
            <div class="form-group">
                <label class="col-xs-12 col-sm-3 col-md-2 control-label">文章来源:<span class="cred">*</span></label>
                <div class="col-sm-9 col-xs-12">
                    <input type="text" class="form-control" name="from" id="from" placeholder="来源" value="">
                </div>
                <div class="clearfix"></div>
            </div>
            <div class="form-group">
                <label class="col-xs-12 col-sm-3 col-md-2 control-label">相关标签:<span class="cred">*</span></label>
                <div class="col-sm-9 col-xs-12">
                    <div class="tagsinput-primary">
                        <input name="tagsinput" class="tagsinput" data-role="tagsinput" value="" />
                    </div>
                </div>
                <div class="clearfix"></div>
            </div>
            <input type="hidden" name="newsid" value="">
             <div class="form-group-submit">
                  <input type="hidden" name="status" value="1">
                  <button type="button" class="btn btnnew" onclick="saveData('/employ','tougaoForm')">
                        Submit
                  </button>
             </div>
        </div>
      </form>
     </div>
     <div class="contribute-wrap-r float-l">
        <h4 class="c0 pt15 pb15 pl20 ma0">投稿需知</h4>
        <p>1.请勿上传国家法律禁止的内容</p>
        <p>2.不得上传涉及侵权内容的稿件</p>
        <p>3.请勿上传涉嫌泄密的内容</p>
        <p>4.请勿上传带有商业广告的稿件</p>
        <p>5.稿件大小限制在50M以内</p>
        <div id="showtips" class="dn">
             <p>6.请勿上传涉嫌泄密的内容</p>
             <p>7.请勿上传带有商业广告的稿件</p>
             <p>8.稿件大小限制在50M以内</p>
        </div>
        <a class="c0" id="toshowtips">查看全部</a>
         <script type="text/javascript">
             $(function(){
                 $("#toshowtips").click(function(){
                     $('#showtips').show();
                     $('#toshowtips').hide();
                 });
             })
         </script>
     </div>
     <div class="clr"></div>
  </div>
</div>
<script type="text/javascript">
    var ue = UE.getEditor('container');
    ue.ready(function() {
        ue.execCommand('serverparam', '_token', '{{ csrf_token() }}');//此处为支持laravel5 csrf ,根据实际情况修改,目的就是设置 _token 值.
        ue.setContent('');
    });
    var ue1 = UE.getEditor('description');
    ue1.ready(function() {
        ue1.execCommand('serverparam', '_token', '{{ csrf_token() }}');//此处为支持laravel5 csrf ,根据实际情况修改,目的就是设置 _token 值.
        ue1.setContent('');
    });

    $(function(){
        /***图片上传****/
        $("#uploadimg").uploadify({
            'formData'     : {
                'fileField':'upfile',
                '_token':'{{ csrf_token() }}'
            },
            "width"           : 120,
            "height"          : 30,
            "queueSizeLimit"  : 1,
            "swf"             : "{{ asset('/js/uploadify/uploadify.swf') }}",
            "fileObjName"     : "upfile",
            "buttonText"      : "上传图片",
            "uploader"        : '/admin/upload/employimg',
            'removeTimeout'	  : 1,
            'fileTypeExts'	  : '*.jpg; *.png; *.gif;',
            'onUploadSuccess':function(file, data, response){
                var data = eval('(' + data + ')');
                if (data.status == 'success') {

                    var html="<div style='width:90px; height:60px;float:left;'>"
                        +"<img src='"+data.attach+"' /><input type='hidden' name='thumb' value='"+data.attach_id+"' />"
                        +"</div>"
                    $('#imgbox').html(html);
//     	            bindImg();
                }else{
                    alert(data.msg);
                    return false;
                }

            }

        });

    });
</script>

@stop


@section('footer')
@parent
@stop

